package com.zky.DAO.impl;

import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.Transaction;

import com.zky.DA0.OrderDao;
import com.zky.common.HibernateSessionFactory;
import com.zky.entity.Orderss;


public class OrderDaoImpl implements OrderDao {
	/* (non-Javadoc)
	 * @see com.zky.DAO.impl.OrderDao#doOrder(com.zky.entity.Orderss)
	 */
	public void doOrder(Orderss order){
		 Session session = HibernateSessionFactory.getSession();
		  Transaction transaction = session.beginTransaction();	 
		  try {
			  session.save(order);
			  transaction.commit();
		} catch (HibernateException e) {
			e.printStackTrace();
		}
		finally{
		    session.close();
		   }
	}

}
